import request from '@/router/axios';
import {
    formateTime
} from '../util/date';
export const list = (data) => request({
    url: '/menu/list',
    method: 'post',
    data
}).then(data => {
    data = data || {};
    data.rows && data.rows.forEach(item => {
        item.create_time = formateTime(item.create_time);
        item.modify_time = formateTime(item.modify_time);
    });
    return data;
});
export const create = (data) => request({
    url: '/menu/create',
    method: "post",
    data
});
export const update = (data) => request({
    url: '/menu/update',
    method: "post",
    data
});
export const remove = (Id) => request({
    url: '/menu/delete',
    method: "post",
    data: {
        Id
    }
});
